//
//  JZHAttentionTableViewCell.m
//  极致荟
//
//  Created by hetao on 14-5-7.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import "JZHAttentionTableViewCell.h"

@implementation JZHAttentionTableViewCell

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)guanz:(id)sender
{
    if(self.ouser.userId!=[User defuceUser].userId)
    {
    [self guanLoadHttp];
    }
    
}
- (void)guanLoadHttp
{
    NSDictionary *dic=[[NSDictionary alloc]initWithObjectsAndKeys:[NSNumber numberWithInt:self.ouser.userId],@"attentionId",[NSNumber numberWithInt:[User defuceUser].userId],@"userId", nil];
    [HttpRequest httpRequestPost:JZHHTTPURL(@"friends/attentionFriend") parameters:dic block:^(id data, HttpReturnCode rerurncode) {
        if(rerurncode==0)
        {
            [MMProgressHUD showSuccessWithTips:@"关注成功"];
        }else
        {
            [MMProgressHUD showInformationWithTips:@"关注失败"];
        }
    }];
}

- (void)addACTCellData:(OtherUsers *)ouser
{
    self.ouser=ouser;
    [ImageCache imageUrl:ouser.userHeadImage UiImageview:self.headImage];
    self.name.text=ouser.name;
    self.job.text=[ouser.jobdic objectForKey:@"name"];
    self.worde.text=[ouser.persdic  objectForKey:@"name"];
    self.adders.text=[ouser.locationdic objectForKey:@"cityName"];
    self.time.hidden=YES;
    if(ouser.userId==[User defuceUser].userId)
    {
      self.but.hidden=YES;
    }else
    {
      self.but.hidden=NO;
    }
//
    //self.worde.text=[[ouser.jobdic objectForKey:<#(id)#>]];
    //self.adders.te;
}
@end
